<script>
    //构建表格工具栏
    function builderToolbar(resData) {

        var html = '<div class="layui-table-tool-temp">';
        //是否显示顶部添加|新增按钮
        if (resData.is_show_add) {
            html += '<div id="tool_add" class="layui-inline" style="padding:4px 0px" title="' + resData.top_add_title + '" lay-event="add"><i class="layui-icon layui-icon-add-1"></i></div>'
        }
        //是否显示顶部删除按钮
        if (resData.is_show_delete) {
            html += '<div id="tool_delete"  class="layui-inline" style="padding:4px 0px" title="' + resData.top_delete_title + '" lay-event="deletes"><i class="layui-icon layui-icon-delete"></i></div>'
        }
        //是否显示 导出全部数据excel
        if(resData.is_show_export_all_button){
            html += '<button id="tool_excel" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="exportExcel"><i class="layui-icon layui-icon-download-circle"></i>导出全部数据</button>'
        }
        html += ' </div>';

        $("#myToolbar").html(html);
    }
</script>